<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
    <meta name="renderer" content="webkit" />
    <meta name="format-detection" content="telephone=no" />
    <title>标识解析系统</title>
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <link rel="stylesheet" href="../css/style.css" />
    <link rel="stylesheet" href="../css/iconfont.css" />
    <link rel="stylesheet" href="../css/element-icons.css" />
    <link rel="stylesheet" href="../css/newiconfont.css" />
    <script src="../js/jquery.min.js"></script>
    <script src="../js/lib.js"></script>
    <!--[if lt IE 9]>
        <script src="https://cdn.bootcss.com/html5shiv/r29/html5.min.js"></script>
        <script src="https://cdn.bootcss.com/respond.../js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <!--[if IE]>
        <link rel="stylesheet" href="../css/all-ie-only.css" />
    <![endif]-->
</head>

<body>
    <div class="header2">
        <div class="wp">
            <a href="" class="header-logo2">
                <img src="../images/logo2.png" alt="" />
                <h2>星火链网 · 骨干节点 <span>（营口）</span></h2>
            </a>
        </div>
    </div>
    <div class="main">
        <div class="jiexi1-bg" style="background-image:url('../images/bg1.png');"></div>
        <div class="jiexi-block1">
            <div class="wp">
                <div class="jiexi1-hd">
                    <h3>通用标识解析</h3>
                    <div class="form-search">
                        <form>
                            <input type="text" id="searchVal" class="inp" placeholder="请输入BID、工业互联网标识" />
                            <a href="javascript:;" class="btn" id="analysis">
                                <img src="../images/so.png" alt="" />
                                解析
                            </a>
                        </form>
                    </div>
                    <div class="jiexi1-recent">
                        <div class="recent-title">历史搜索：<span id="record"></span></div>
                    </div>
                </div>
                <div class="block-1" id="content">
                    <div class="block1-cont">
                        <div class="content-1">
                            <div class="content-title2">
                                <h3>
                                    <span>BID标识:</span>
                                    <span id="bid"></span>
                                </h3>
                            </div>
                            <div class="form-1 form-2">
                                <div class="form-item col-2">
                                    <div class="tit">是否启用：</div>
                                    <div class="con" id="enable"></div>
                                </div>
                                <div class="form-item col-2">
                                    <div class="tit">上链状态：</div>
                                    <div class="con" id="status"></div>
                                </div>
                                <div class="form-item col-2">
                                    <div class="tit">编码算法：</div>
                                    <div class="con" id="encodingAlgorithm"></div>
                                </div>
                                <div class="form-item col-2">
                                    <div class="tit">创建人BID：</div>
                                    <div class="con" id="createUserBid"></div>
                                </div>
                                <div class="form-item col-2">
                                    <div class="tit">创建时间：</div>
                                    <div class="con" id="createDate"></div>
                                </div>
                                <div class="form-item col-2">
                                    <div class="tit">更新时间：</div>
                                    <div class="con" id="updateDate"></div>
                                </div>
                            </div>
                            <div class="content-title">
                                <h3>公钥</h3>
                            </div>
                            <div class="form-1 form-2">
                                <div class="form-item col-2">
                                    <div class="tit">BID加密算法：</div>
                                    <!-- 没找到这个字段 -->
                                    <div class="con">secp256k1</div>
                                </div>
                                <div class="form-item col-2">
                                    <div class="tit">BID公钥：</div>
                                    <div class="con" id="bidPublickey"></div>
                                </div>
                                <div class="form-item col-2">
                                    <div class="tit">被授权人BID：</div>
                                    <div class="con" id="signerBid"></div>
                                </div>
                            </div>
                            <div class="content-title">
                                <h3>最新签名信息</h3>
                            </div>
                            <div class="form-1 form-2">
                                <div class="form-item col-2">
                                    <div class="tit">签名人BID：</div>
                                    <div class="con" id="signerBid1"></div>
                                </div>
                                <div class="form-item col-2">
                                    <div class="tit">签名值：</div>
                                    <div class="con" id="signature"></div>
                                </div>
                                <div class="form-item col-2">
                                    <div class="tit">签名时间：</div>
                                    <div class="con" id="signatureDate"></div>
                                </div>
                            </div>
                            <div class="content-title">
                                <h3>服务说明</h3>
                            </div>
                            <div class="data-content3 table-scroll-x">
                                <div class="table1-head table-3">
                                    <table>
                                        <thead>
                                            <tr>
                                                <th class="table1_center">序号</th>
                                                <th class="table1_center">服务名称</th>
                                                <th class="table1_center">服务类型</th>
                                                <th class="table1_center">服务链接</th>
                                            </tr>
                                        </thead>
                                    </table>
                                </div>
                                <div class="table1-body table-3">
                                    <div id="service"></div>
                                </div>
                            </div>
                            <div class="content-title">
                                <h3>属性说明</h3>
                            </div>
                            <div class="form-1 form-2">
                                <div class="form-item col-2">
                                    <div class="tit">数据模板：</div>
                                    <div class="con" id="templateName"></div>
                                </div>
                            </div>
                            <div class="data-content3 table-scroll-x">
                                <div class="table1-head table-3">
                                    <table>
                                        <thead>
                                            <tr>
                                                <th class="table1_center">序号</th>
                                                <th class="table1_center">属性名称</th>
                                                <th class="table1_center">属性值</th>
                                            </tr>
                                        </thead>
                                    </table>
                                </div>
                                <div class="table1-body table-3">
                                    <div id="property"></div>
                                </div>
                            </div>
                        </div>
                        <div class="set-bt2">
                            <a href="" class="primary-btn">
                                <span>返回</span>
                            </a>
                        </div>
                    </div>
                </div>
                <div class="result-cont" id="nodata">
                    <div class="none-data2">
                        <div class="pic">
                            <img src="../images/none_data2.png" alt="" />
                        </div>
                        <p>抱歉！没有找到符合条件的相关数据！</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="footer2">
        <div class="wp">
            <div class="footer2-copy">
                <p>Copyright © 2016-2022 北京泰尔英福网络科技有限责任公司 京ICP备12003601-6号</p>
            </div>
        </div>
    </div>
    <div class="pop-bg"></div>
    <!-- 合约禁用弹窗 -->
    <div class="m-pop" id="pop-heyuejinyong">
        <div class="win-pop1">
            <div class="win1-hd">
                <div class="win1-btn">
                    <a href="javascript:;" class="close js-close">
                        <i class="el-icon-close"></i>
                    </a>
                </div>
                <h3>合约禁用</h3>
            </div>
            <div class="win1-bd">
                <div class="win1-item">
                    <div class="tit">禁用原因<span>*</span></div>
                    <div class="con">
                        <input type="text" class="input-inner" />
                    </div>
                </div>
            </div>
            <div class="win-bt">
                <a href="javascript:;" class="js-btn"><span>取 消</span></a>
                <a href="" class="primary-btn"><span>确 定</span></a>
            </div>
        </div>
    </div>
    <!-- 合约禁用弹窗 end -->
    <!-- 撤销弹窗 -->
    <div class="m-pop" id="pop-chexiaozhengshu">
        <div class="win-pop1">
            <div class="win1-hd">
                <div class="win1-btn">
                    <a href="javascript:;" class="close js-close">
                        <i class="el-icon-close"></i>
                    </a>
                </div>
                <h3>撤销</h3>
            </div>
            <div class="win1-bd">
                <div class="win1-item">
                    <div class="tit">撤销原因:</div>
                    <div class="con">
                        <textarea class="textarea-inner" placeholder="请输入撤销原因"></textarea>
                    </div>
                </div>
            </div>
            <div class="win-bt">
                <a href="" class="primary-btn"><span>提交</span></a>
                <a href="javascript:;" class="js-btn"><span>返回</span></a>
            </div>
        </div>
    </div>
    <!-- 撤销弹窗 end -->
    <!-- 禁用弹窗 -->
    <div class="m-pop" id="pop-jinyong">
        <div class="win-pop3">
            <div class="win1-hd">
                <div class="win1-btn">
                    <a href="javascript:;" class="close js-close">
                        <i class="el-icon-close"></i>
                    </a>
                </div>
                <h3>提示</h3>
            </div>
            <div class="win3-bd">
                <div class="win3-item">
                    <div class="icon_dn el-icon-info"></div>
                    <div class="desc">
                        <p>您确定要禁用标识吗？</p>
                    </div>
                </div>
            </div>
            <div class="win-bt2">
                <a href="javascript:;" class="js-btn"><span>取消</span></a>
                <a href="" class="primary-btn"><span>确定</span></a>
            </div>
        </div>
    </div>
    <!-- 禁用弹窗 end -->
    <!-- 启用弹窗 -->
    <div class="m-pop" id="pop-qiyong">
        <div class="win-pop3">
            <div class="win1-hd">
                <div class="win1-btn">
                    <a href="javascript:;" class="close js-close">
                        <i class="el-icon-close"></i>
                    </a>
                </div>
                <h3>提示</h3>
            </div>
            <div class="win3-bd">
                <div class="win3-item">
                    <div class="icon_dn el-icon-info"></div>
                    <div class="desc">
                        <p>您确定要启用标识吗？</p>
                    </div>
                </div>
            </div>
            <div class="win-bt2">
                <a href="javascript:;" class="js-btn"><span>取消</span></a>
                <a href="" class="primary-btn"><span>确定</span></a>
            </div>
        </div>
    </div>
    <!-- 启用弹窗 end -->
    <!-- 下载KeyStore -->
    <div class="m-pop" id="pop-xiazaiKeyStore">
        <div class="win-pop3">
            <div class="win1-hd">
                <div class="win1-btn">
                    <a href="javascript:;" class="close js-close">
                        <i class="el-icon-close"></i>
                    </a>
                </div>
                <h3>提示</h3>
            </div>
            <div class="win3-bd">
                <div class="win3-item">
                    <div class="tit">请输入创建人的私钥</div>
                    <div class="con">
                        <input type="text" class="input-inner" />
                    </div>
                </div>
            </div>
            <div class="win-bt2">
                <a href="javascript:;" class="js-btn"><span>取消</span></a>
                <a href="" class="primary-btn"><span>确定</span></a>
            </div>
        </div>
    </div>
    <!-- 下载KeyStore end -->
    <!-- 删除 -->
    <div class="m-pop" id="pop-shanchu">
        <div class="win-pop3">
            <div class="win1-hd">
                <div class="win1-btn">
                    <a href="javascript:;" class="close js-close">
                        <i class="el-icon-close"></i>
                    </a>
                </div>
                <h3>提示</h3>
            </div>
            <div class="win3-bd">
                <div class="win3-item">
                    <div class="icon_dn el-icon-warning"></div>
                    <div class="desc">
                        <p>此操作将永久删除该数据, 是否继续?</p>
                    </div>
                </div>
            </div>
            <div class="win-bt2">
                <a href="javascript:;" class="js-btn"><span>取消</span></a>
                <a href="" class="primary-btn"><span>确定</span></a>
            </div>
        </div>
    </div>
    <!-- 删除 end -->
    <!-- 删除2 -->
    <div class="m-pop" id="pop-shanchu2">
        <div class="win-pop3">
            <div class="win1-hd">
                <div class="win1-btn">
                    <a href="javascript:;" class="close js-close">
                        <i class="el-icon-close"></i>
                    </a>
                </div>
                <h3>提示</h3>
            </div>
            <div class="win3-bd">
                <div class="win3-item">
                    <div class="icon_dn el-icon-info"></div>
                    <div class="desc">
                        <p>确定删除选中角色?</p>
                    </div>
                </div>
            </div>
            <div class="win-bt2">
                <a href="javascript:;" class="js-btn"><span>取消</span></a>
                <a href="" class="primary-btn"><span>确定</span></a>
            </div>
        </div>
    </div>
    <!-- 删除2 end -->
    <!-- 删除3 -->
    <div class="m-pop" id="pop-shanchu3">
        <div class="win-pop3">
            <div class="win1-hd">
                <div class="win1-btn">
                    <a href="javascript:;" class="close js-close">
                        <i class="el-icon-close"></i>
                    </a>
                </div>
                <!-- <h3>提示</h3> -->
            </div>
            <div class="win3-bd">
                <div class="win3-item">
                    <div class="icon_dn el-icon-warning"></div>
                    <div class="desc">
                        <p>确定将选择数据删除?</p>
                    </div>
                </div>
            </div>
            <div class="win-bt2">
                <a href="javascript:;" class="js-btn"><span>取消</span></a>
                <a href="" class="primary-btn"><span>确定</span></a>
            </div>
        </div>
    </div>
    <!-- 删除3 end -->
    <!-- 删除4 -->
    <div class="m-pop" id="pop-shanchu4">
        <div class="win-pop3">
            <div class="win1-hd">
                <div class="win1-btn">
                    <a href="javascript:;" class="close js-close">
                        <i class="el-icon-close"></i>
                    </a>
                </div>
                <!-- <h3>提示</h3> -->
            </div>
            <div class="win3-bd">
                <div class="win3-item">
                    <div class="icon_dn el-icon-warning"></div>
                    <div class="desc">
                        <p>确定将选择数据删除?</p>
                    </div>
                </div>
            </div>
            <div class="win-bt2">
                <a href="javascript:;" class="js-btn"><span>取消</span></a>
                <a href="" class="primary-btn"><span>确定</span></a>
            </div>
        </div>
    </div>
    <!-- 删除4 end -->
    <!-- 移至黑名单 -->
    <div class="m-pop" id="pop-yizhiheimingdan">
        <div class="win-pop3">
            <div class="win1-hd">
                <div class="win1-btn">
                    <a href="javascript:;" class="close js-close">
                        <i class="el-icon-close"></i>
                    </a>
                </div>
                <h3>提示</h3>
            </div>
            <div class="win3-bd">
                <div class="win3-item">
                    <div class="icon_dn el-icon-warning"></div>
                    <div class="desc">
                        <p>确定将该用户移至黑名单吗?</p>
                    </div>
                </div>
            </div>
            <div class="win-bt2">
                <a href="javascript:;" class="js-btn"><span>取消</span></a>
                <a href="" class="primary-btn"><span>确定</span></a>
            </div>
        </div>
    </div>
    <!-- 移至黑名单 end -->
    <!-- 升至管理员 -->
    <div class="m-pop" id="pop-shengzhiguanliyuan">
        <div class="win-pop3">
            <div class="win1-hd">
                <div class="win1-btn">
                    <a href="javascript:;" class="close js-close">
                        <i class="el-icon-close"></i>
                    </a>
                </div>
                <h3>提示</h3>
            </div>
            <div class="win3-bd">
                <div class="win3-item">
                    <div class="icon_dn el-icon-warning"></div>
                    <div class="desc">
                        <p>确定将该用户添加至管理员?</p>
                    </div>
                </div>
            </div>
            <div class="win-bt2">
                <a href="javascript:;" class="js-btn"><span>取消</span></a>
                <a href="" class="primary-btn"><span>确定</span></a>
            </div>
        </div>
    </div>
    <!-- 升至管理员 end -->
    <!-- 移除管理员 -->
    <div class="m-pop" id="pop-yichuguanliyuan">
        <div class="win-pop3">
            <div class="win1-hd">
                <div class="win1-btn">
                    <a href="javascript:;" class="close js-close">
                        <i class="el-icon-close"></i>
                    </a>
                </div>
                <h3>提示</h3>
            </div>
            <div class="win3-bd">
                <div class="win3-item">
                    <div class="icon_dn el-icon-info"></div>
                    <div class="desc">
                        <p>确定移除该用户管理员?</p>
                    </div>
                </div>
            </div>
            <div class="win-bt2">
                <a href="javascript:;" class="js-btn"><span>取消</span></a>
                <a href="" class="primary-btn"><span>确定</span></a>
            </div>
        </div>
    </div>
    <!-- 移除管理员 end -->
    <!-- 重置密码 -->
    <div class="m-pop" id="pop-chongzhimima">
        <div class="win-pop3">
            <div class="win1-hd">
                <div class="win1-btn">
                    <a href="javascript:;" class="close js-close">
                        <i class="el-icon-close"></i>
                    </a>
                </div>
                <h3>请输入接收密码的邮箱</h3>
            </div>
            <div class="win3-bd">
                <div class="form-1 form-4">
                    <form action="">
                        <div class="form-item col-1">
                            <div class="tit"></div>
                            <div class="con">
                                <input type="text" class="input-inner" placeholder="">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="win-bt2">
                <a href="javascript:;" class="js-btn"><span>取消</span></a>
                <a href="" class="primary-btn"><span>确定</span></a>
            </div>
        </div>
    </div>
    <!-- 重置密码 end -->
    <!-- 钱包解锁弹窗 -->
    <div class="m-pop" id="pop-qianbaojiesuo">
        <div class="win-pop2">
            <div class="win1-hd">
                <div class="win1-btn">
                    <a href="javascript:;" class="close js-close">
                        <i class="el-dialog__close el-icon el-icon-close"></i>
                    </a>
                </div>
                <h3>钱包解锁</h3>
            </div>
            <div class="win1-bd">
                <div class="win2-item">
                    <div class="tit">请选择方式：</div>
                    <div class="con">
                        <ul class="radio-group js-custom-radio-checkbox" data-modulename="formrel01">
                            <li data-selectName=".item-select1">
                                <label>
                                    <input type="radio" name="1" checked />
                                    <i class="icon"></i>
                                    <span>BID keystore 文件</span>
                                </label>
                            </li>
                            <li data-selectName=".item-select2">
                                <label>
                                    <input type="radio" name="1" />
                                    <i class="icon"></i>
                                    <span>BID私钥</span>
                                </label>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="win2-item item-select1">
                    <div class="tit">请选择BID Keystore文件</div>
                    <div class="con">
                        <div class="file-upload_box3">
                            <div class="fileUpload-btn3">
                                <label>
                                    <input type="file" class="js-upload">
                                    <span><i class="icon_dn el-icon-upload e-upload"></i>选择文件</span>
                                </label>
                            </div>
                            <ul class="fileUpload-files">
                                <!-- <li>
                                <a href="javascript:;">
                                    <i class="el-icon-document"></i>
                                    <span>5cd67b13-740e-4f77-b950-09e47e60881d (1).json</span>
                                </a>
                                <i class="el-icon-close"></i>
                            </li> -->
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="win2-item col-1 item-select1">
                    <div class="tit">请输入密码：</div>
                    <div class="con">
                        <div class="input-suffix">
                            <input type="password" class="input-inner" placeholder="请输入密码" />
                            <div class="icon">
                                <i class="el-input__icon i-changetype el-icon-view"></i>
                                <i class="el-input__icon el-icon-circle-close"></i>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="win2-item col-1 item-select2">
                    <div class="tit">请输入BID私钥：</div>
                    <div class="con">
                        <div class="input-suffix">
                            <input type="password" class="input-inner" placeholder="请输入BID私钥" />
                            <div class="icon">
                                <i class="el-input__icon i-changetype el-icon-view"></i>
                                <i class="el-input__icon el-icon-circle-close"></i>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="win-bt win-bt_center">
                <a href="javascript:;" class="js-btn"><span>取 消</span></a>
                <a href="" class="primary-btn"><span>确 定</span></a>
            </div>
        </div>
    </div>
    <!-- 钱包解锁弹窗 end -->
    <!-- 显隐 -->
    <div class="m-pop" id="pop-xianyin">
        <div class="win-pop5">
            <div class="win1-hd">
                <div class="win1-btn">
                    <a href="javascript:;" class="close js-close">
                        <i class="el-dialog__close el-icon el-icon-close"></i>
                    </a>
                </div>
                <h3>多 选</h3>
            </div>
            <div class="win1-bd">
                <ul class="checkbox-group2 js-custom-radio-checkbox" data-modulename="formrel01">
                    <li>
                        <label>
                            <input type="checkbox" name="1" checked />
                            <i class="icon"></i>
                            <span>角色名称</span>
                        </label>
                    </li>
                    <li>
                        <label>
                            <input type="checkbox" name="1" />
                            <i class="icon"></i>
                            <span>所属租户</span>
                        </label>
                    </li>
                    <li>
                        <label>
                            <input type="checkbox" name="1" />
                            <i class="icon"></i>
                            <span>角色别名</span>
                        </label>
                    </li>
                    <li>
                        <label>
                            <input type="checkbox" name="1" />
                            <i class="icon"></i>
                            <span>角色排序</span>
                        </label>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <!-- 显隐 end -->
    <script src="../js/module.js"></script>
    <script>
        var statusList = ['失败', '成功', '已上链'];
        var getData = function (bid) {
            $request({
                url: '/resolverApi/markBid/resolve?bid=' + bid,
            }, function (res) {
                console.log(111, res);
                var property = res.bidPropertyValues;
                var record = res.bidRecord;
                var service = res.bidServiceValues;
                $('#record').html(record.bid || '暂无');
                renderBid(record);
                renderTableService(service);
                renderTableProperty(property);
                if (property.length || service.length || record.bid) {
                    $('#content').show();
                    $('#nodata').hide();
                } else {
                    $('#content').hide();
                    $('#nodata').show();
                }
            })
        }
        function renderBid(list) {
            $('#bid').html(list.bid);
            $('#enable').html(list.enable ? '是' : '否');
            $('#status').html(statusList[list.status]);
            $('#encodingAlgorithm').html(list.encodingAlgorithm);
            $('#createUserBid').html(list.createUserBid);
            $('#createDate').html(list.createDate);
            $('#updateDate').html(list.updateDate);
            $('#bidPublickey').html(list.bidPublickey);
            $('#signerBid').html(list.signerBid);
            $('#signerBid1').html(list.signerBid);
            $('#signature').html(list.signature);
            $('#signatureDate').html(list.signatureDate);
            $('#templateName').html(list.templateName);
        }
        function renderTableService(list) {
            if (list.length) {
                var temp = '';
                $.each(list, function(i, x){
                    temp += "<table><tr>" +
                        "<td>" + (i + 1) + "</td>" +
                        "<td>" + x.name + "</td>" +
                        "<td>" + x.type + "</td>" +
                        "<td>" + x.link + "</td>"
                    "</tr></table>"
                })
                $('#service').children().remove();
                $('#service').append(temp);
            } else {
                $('#service').append("<div class='none-data'><p>暂无数据</p></div>");
            }
        }
        function renderTableProperty(list) {
            if (list.length) {
                var temp = '';
                $.each(list, function(i, x){
                    temp += "<table><tr>" +
                        "<td>" + (i + 1) + "</td>" +
                        "<td>" + x.data + "</td>" +
                        "<td>" + x.type + "</td>" +
                        "</tr></table>"
                })
                $('#property').children().remove();
                $('#property').append(temp);
            } else {
                $('#property').append("<div class='none-data'><p>暂无数据</p></div>");
            }
        }
        var init = function () {
            $('#content').hide();
            $('#nodata').show();
        }
        // 解析
        $('#analysis').click(function () {
            getData($('#searchVal').val());
        })
        init();
    </script>
</body>

</html>